﻿@model OA.Model.CustomForm
@{
    ViewBag.Title = "编辑单据";
    Layout = "~/Areas/Admin/Views/Shared/_form_layout.cshtml";
}

@Html.Partial("_Form", Model, ViewData)

<script type="text/javascript">
    var jsob = "";
    layui.use('form', function () {
        var form = layui.form;
        form.on('select(filter)', function (data) {
            $.each(json, function (index, info) {
                if (info.Value == data.value) {
                    for (var key in item) {
                        if ($("dicExtend" + key).length > 0) { $("dicExtend" + key).val(item[key]); }
                    }
                }
            });
            layui.use('form', function () {
                var form = layui.form;
                form.on('select(dicExtend__C)', function (data) {
                    if ($(data.elem).parent().hasClass("layui-input-block")) {
                        $.each(json_dicExtend__C, function (index, info) {
                            if (info.Value == data.value) {
                                for (var key in item) {
                                    if ($("#dicExtend_" + key).length > 0) { $("#dicExtend_" + key).val(item[key]); }
                                }
                            }
                        });
                    }
                });
            });    
        });
    });
</script>